#ifndef __CONTROL_H_
#define __CONTROL_H_
#include "sys.h"
#include "system.h"
extern u16 Run_Time_S;//1s
extern u32 Address_index;
extern u8 History_Data[600];
extern u8 Flash_Flag;
extern u8 CMD;

void AllPidInit(void);
float TemperatureControl(float SensorData,float Target_Data);
float HumidityControl(float SensorData,float Target_Data);
void  Set_PWM(float T,float H);
void Set_Time(u16 t);

void T_PID_Set(float p,float i,float d);
void H_PID_Set(float p,float i,float d);
void Set_Temperature(u8 Temp);
void Set_Humidity(u8 Temp);
void Controler_State(u8 state);
void Flash_Store(void);
void Flash_Read(void);
void History_Control(u8 state);
#endif


